#ifndef SGL_H
#define SGL_H

#include <iostream>
#include <map>
#include <string>
#include "Irrlicht.h"
#include "SGLmacros.h"
#include "CObject.h"
#include "CObject2D.h"
#include "CObject3D.h"
#include "CLib2D.h"
#include "SGLAction.h"
#include "CSGLColor.h"

namespace SGLEngine {

	class SGL : public irr::IEventReceiver {
		private:
			irr::IrrlichtDevice* SGL::device;
			CLib2D * Lib2D;
			CSGLColor * SGLColor;
			std::map<std::string, CObject2D*> objects2d;
			std::map<std::string, CObject3D*> objects3d;
			std::vector<SGLAction*> key_events;
		public:
			declareSGLfun(SGL());
			declareSGLfun(SGL(SGLSettings set));
			declareSGLfun(~SGL());
			declareSGLfun(void init());
			declareSGLfun(bool DeviceIsRunning());
			declareSGLfun(void AddObject(CObject2D* obj, std::string name));
			declareSGLfun(void AddObject(CObject3D* obj, std::string name));
			declareSGLfun(void DrawAll());
			declareSGLfun(void BeginScene(bool usebackBuffer, bool usezBuffer, irr::video::SColor color));
			declareSGLfun(void BeginScene(SGLSceneSettings set));
			declareSGLfun(CSGLColor * getSGLColor());
			declareSGLfun(CObject2D* get2DObject(std::string name));
			declareSGLfun(void AddKeyEvent(void* sga));
			declareSGLfun(virtual bool OnEvent(const irr::SEvent &irrevent));
	};
}

#endif